<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

{if $row['server_type'] == 0}
    <!--<div class="form-group is_agent_div">-->
        <!--<label for="c-is_agent" class="control-label col-xs-12 col-sm-2">{:__('Is agent')}:</label>-->
        <!--<div class="col-xs-12 col-sm-4">-->
            <!--{:build_radios('row[is_agent]', ['0'=>__('否'), '1'=>__('是')], $row['is_agent'])}-->
        <!--</div>-->
    <!--</div>-->
    <!--<div class="form-group is_shop_div">-->
        <!--<label for="c-is_shop" class="control-label col-xs-12 col-sm-2">{:__('Is shop')}:</label>-->
        <!--<div class="col-xs-12 col-sm-4">-->
            <!--{:build_radios('row[is_shop]', ['0'=>__('否'), '1'=>__('是')], $row['is_shop'])}-->
        <!--</div>-->
    <!--</div>-->
    <div class="form-group is_shop_div">
        <label for="c-is_shop" class="control-label col-xs-12 col-sm-2">{:__('Is VIP')}:</label>
        <div class="col-xs-12 col-sm-4">
            {:build_radios('row[is_vip]', ['0'=>__('否'), '1'=>__('是')], $row['is_vip'])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('所属区域')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="form-inline" data-toggle="cxselect" data-selects="province,city,area">
                <select class="province form-control" name="row[province]" data-url="ajax/rowarea">
                    <option value="{$row.province}" selected=""></option>
                </select>
                <select class="city form-control" name="row[city]" data-url="ajax/rowarea">
                    <option value="{$row.city}" selected=""></option>
                </select>
                <select class="area form-control" name="row[area]" data-url="ajax/rowarea">
                    <option value="{$row.area}" selected=""></option>
                </select>
            </div>

        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Parent id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id"  data-source="user/user/index" data-field="nickname" data-params='{"custom[server_type]":"0"}' class="form-control selectpage" name="row[parent_id]" type="text" value="{$row['parent_id']}">
        </div>
    </div>

    <div class="form-group">
        <label for="c-username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-username" data-rule="required" class="form-control" name="row[username]" type="text" value="{$row.username}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-nickname" data-rule="required" class="form-control" name="row[nickname]" type="text" value="{$row.nickname}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-password" data-rule="" class="form-control" name="row[password]" type="text" value="" placeholder="{:__('Leave password blank if dont want to change')}" autocomplete="new-password" />
        </div>
    </div>

    <div class="form-group">
        <label for="c-money" class="control-label col-xs-12 col-sm-2">{:__('Money')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-money" data-rule="required" class="form-control" name="row[money]" type="number" value="{$row.money}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-score" class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-score" data-rule="required" class="form-control" name="row[score]" type="number" value="{$row.score}">
        </div>
    </div>

    <div class="form-group">
        <label for="c-mobile" class="control-label col-xs-12 col-sm-2">{:__('Consume_res')}%:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-consume_res" data-rule="" class="form-control" name="row[consume_res]" type="number" value="{$row.consume_res}">
        </div>
    </div>

    <div class="form-group">
        <label for="c-mobile" class="control-label col-xs-12 col-sm-2">{:__('Contribute_res')}%:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-contribute_res" data-rule="" class="form-control" name="row[contribute_res]" type="number" value="{$row.contribute_res}">
        </div>
    </div>

    <div class="form-group">
        <label for="c-mobile" class="control-label col-xs-12 col-sm-2">{:__('消费积分返点')}%:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-integer_res" data-rule="" class="form-control" name="row[integer_res]" type="number" value="{$row.integer_res}">
        </div>
    </div>


    <div class="form-group">
        <label for="c-email" class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-email" data-rule="" class="form-control" name="row[email]" type="text" value="{$row.email}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-mobile" data-rule="" class="form-control" name="row[mobile]" type="text" value="{$row.mobile}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-avatar" class="control-label col-xs-12 col-sm-2">{:__('Avatar')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-avatar" data-rule="" class="form-control" size="50" name="row[avatar]" type="text" value="{$row.avatar}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-avatar"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-avatar"></ul>
        </div>
    </div>

    <div class="form-group">
        <label for="c-gender" class="control-label col-xs-12 col-sm-2">{:__('Gender')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[gender]', ['1'=>__('Male'), '0'=>__('Female')], $row['gender'])}
        </div>
    </div>







    <div class="form-group">
        <label for="content" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
